using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebControls;
using BusinessLayer;
using InfraStructureLayer;

public partial class UserControls_uctPhotoAlbums : SFUserControl
{
    protected bool sfrPhotoAlbums_NeedsDataSource()
    {
        busPhotoAlbums insBusPhotoAlbums = new busPhotoAlbums();
        DataTable insDataTablePhotoAlbums = insBusPhotoAlbums.SelectPhotoAlbumsByLanguageId();
        if (insBusPhotoAlbums.HasErrors)
        {
            MessageBoxShow(insBusPhotoAlbums);
            return true;
        }

        sfrPhotoAlbums.SetData(insDataTablePhotoAlbums);
        return insBusPhotoAlbums.HasErrors;
    }
    protected void ibtRss_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/" + CurrentContext.Language + "/Rss/RssPhotos.ashx");
    }
    protected void lbtShowAll_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/" + CurrentContext.Language + "/photos/default.aspx");
    }
    protected string GenerateUrl(object obj)
    {
        return "~/" + CurrentContext.Language + "/photos/Album" + new Crypto().EncryptURL(obj.ToString()) + ".aspx";
    }
}
